#include <cstdio>
#include <cstring>
#include <algorithm>
#include <ctime>

using namespace std;
int Aa[4010];
int main(){
	srand(time(NULL));
	int N, A, B;
	N = rand() % 1000 + 1;
	A = rand() % 1000 + 1;
	B = rand() % 1000 + 1;
	printf("%d %d %d\n", N, A, B);
	int Q = 2 * (A + B);
	for(int i=1; i<=Q; i++)
		Aa[i] = 100 * i;
	random_shuffle(Aa+1, Aa+Q+1);
	for(int i=1; i<=Q; i+=2){
		if(Aa[i] > Aa[i+1])
			swap(Aa[i], Aa[i+1]);
		printf("%d %d\n", Aa[i], Aa[i+1]);
	}
}
